<h2 class="contentTitle">表单验证</h2>
<div class="pageContent">
	<form method="post" action="{:U('newlist/addAction')}?callbackType=closeCurrent" class="pageForm required-validate" enctype="multipart/form-data" onsubmit="return iframeCallback(this,dialogAjaxDone);">

		<div class="pageFormContent nowrap" layoutH="97">
			<dl>
				<dt>选择：</dt>
				<dd>
					<select class='select' name='pid'>
					<option value='0,'>添加商品</option>
						<foreach name="shuju" item="vo" >
							<option value="{$vo.id}">{$vo.name}</option>
						</foreach>
					</select>
				</dd>
			</dl>
			<dl>
				<dt>标题：</dt>
				<dd>
					<input type="text" name="title" maxlength="20" class="required" />
					<span class="info">标题</span>
				</dd>
			</dl>
			<dl>
				<dt>内容：</dt>
				<dd>
					<input type="text" name="content" maxlength="20" class="required"/>
					<span class="info">内容</span>
				</dd>
			</dl>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">提交</button></div></div></li>
				<li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div></li>
			</ul>
		</div>
	</form>
</div>
<script type="text/javascript">
function customvalidXxx(element){
	if ($(element).val() == "xxx") return false;
	return true;
}
</script>